# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VectorTile.V1.Model.TriangleStrip do
  @moduledoc """
  Represents a strip of triangles. Each triangle uses the last edge of the previous one. The following diagram shows an example of a triangle strip, with each vertex labeled with its index in the vertex_index array. (1)-----(3) / \\ / \\ / \\ / \\ / \\ / \\ (0)-----(2)-----(4) Vertices may be in either clockwise or counter-clockwise order.

  ## Attributes

  *   `vertexIndices` (*type:* `list(integer())`, *default:* `nil`) - Index into the vertex_offset array representing the next vertex in the triangle strip.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :vertexIndices => list(integer()) | nil
        }

  field(:vertexIndices, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.VectorTile.V1.Model.TriangleStrip do
  def decode(value, options) do
    GoogleApi.VectorTile.V1.Model.TriangleStrip.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VectorTile.V1.Model.TriangleStrip do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
